package com.wushijia.designpatterns.single;

/**
 * @author 92090
 */

public enum EnumSingleTest1 {

  /**
   * 单例对象
   */
  INSTANCE;

  EnumSingleTest1() {
    System.out.println();
  }

  public static void method() {
    //调用静态方法会导致INSTANCE被实例化，不能做到懒加载
  }

  public static EnumSingleTest1 getInstance() {
    return INSTANCE;
  }
}
